<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        let p1 = new Promise((resolve, reject)=>{
            // 修改promise对象的状态
            reject('err')
        })

        p1.catch(reason => {
            console.log(reason)
        })
    </script>
</body>
</html>